import request from '@/utils/request'

/**
 * 登记
 * @param {*} data
 * @returns
 */
export const apply = data => {
  return request({
    url: '/vaccineReg/apply',
    method: 'POST',
    data
  })
}

/**
 * 发送消息
 * @param {*} ids
 * @returns
 */
export const sendSms = (arriveDate, ids) => {
  return request({
    url: '/vaccineReg/sendSms/' + arriveDate,
    method: 'PUT',
    data: ids
  })
}

/**
 * @param {*} searchPage
 * @returns
 */
export const exportData = searchPage => {
  return request({
    url: '/vaccineReg/exportData',
    method: 'POST',
    data: searchPage
  })
}

/**
 * @param {*} a
 * @param {*} b
 * @param {*} c
 * @returns  responseType 这个是必须要的，不然一直报错
 */
export const exportUrl = (a, b, c) => {
  return request({
    url: '/vaccineReg/exportData/' + a + '/' + b + '/' + c,
    method: 'GET',
    responseType: 'blob'
  })
}
